/*!
\copyright  Copyright (c) 2024 -2025 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      Handles LE Audio Decoder processing chain

*/

#ifndef KYMERA_LE_AUDIO_DECODER_H_
#define KYMERA_LE_AUDIO_DECODER_H_

#if defined(INCLUDE_LE_AUDIO_UNICAST) || defined(INCLUDE_LE_AUDIO_BROADCAST)

#include "kymera_adaptation_voice_protected.h"
#include "chain.h"

#if defined(INCLUDE_CIS_MIRRORING) || defined(ENABLE_MULTI_PERIPHERAL_CIS)
/*! \brief Configure Mixer operator.
*/
void KymeraLeAudioDecoder_ConfigureMixer(uint32 sample_rate, kymera_chain_handle_t chain_handle);
#else
#define KymeraLeAudioDecoder_ConfigureMixer(sample_rate, chain_handle)
#endif

/*! \brief Utility to get LE audio decoder output for the specified endpoint

    \param endpoint_role

    \return Source the output source for LE Audio chain
*/
Source KymeraLeAudioDecoder_GetOutput(unsigned endpoint_role);

/*! \brief Start LE decoder only chain.
*/
void KymeraLeAudioDecoder_StartChain(void);

/*! \brief Handle request to stop LE decoder chain.
*/
void KymeraLeAudioDecoder_StopChain(void);

/*! \brief Configure LE audio decoder chain

    \param le_speaker_config_t params used to confgiure the LE decoder chain
*/
void KymeraLeAudioDecoder_ConfigureChain(const le_speaker_config_t *le_speaker_params);

/*! \brief Handle request to create LE decoder chain.

    \param le_speaker_config_t params to create the LE decoder graph with
*/
void KymeraLeAudioDecoder_CreateChain(const le_speaker_config_t *le_speaker_params);

#else /* INCLUDE_LE_AUDIO_UNICAST */

#define KymeraLeAudioDecoder_CreateChain(le_speaker_params)      ((void)(0))
#define KymeraLeAudioDecoder_StartChain()                        ((void)(0))
#define KymeraLeAudioDecoder_StopChain()                         ((void)(0))
#define KymeraLeAudioDecoder_ConfigureChain(le_speaker_params)   ((void)(0))
#define KymeraLeAudioDecoder_GetOutput(endpoint_role)            ((void)(0))

#endif /* INCLUDE_LE_AUDIO_UNICAST */

#endif /* KYMERA_LE_AUDIO_DECODER_H_ */
